home *** CD-ROM | disk | FTP | other *** search
/ Megarom / Megarom Macintosh CD Software (Quantum Leap)(1992).iso / APPS / Torquemada the Inquisitor / Torquemada Schmoozes On and On < prev    next >
Encoding:
Text File  |  1992-03-12  |  10.8 KB  |  117 lines  |  [TEXT/ttxt]

  1. Release notes for Torquemada the Inquisitor
  2.  
  3. [Notes to subsequent releases are appended]
  4.  
  5.  
  6. The About box of the software explains its use in gross terms. This Read Me file is supplied to tie up some loose ends.
  7.  
  8. First: there were twenty fine people who lent their grace, dilligence and intelligence to the XP8 beta testing process. They are honored in the default Torquemada Prefs file shipped with this archive. They have my gratitude and my highest respect. XP8 would not have shipped as well or as soon without them.
  9.  
  10. Second: this program exists because of a need expressed by Garry Fairbairn, who helps to publish a newspaper for producers of westerns. He wanted a way to change raw dollars to a percentage of the gross, or somesuch. I didn't get it, so I wrote this software to punish him.
  11.  
  12. No, really. What this does is search for specified string literals and replace them with other specified string literals. It operates on a line at a time, and works from the upper left of the grid of strings to the lower right. This is significant: it means that a later search string can operate on the results of an earlier replace string. It took me a while to think of a reason that this might be useful, but I finally got one. Garry wanted a way to change "dlrs." to "donuts" (essential brain food for producers of westerns). It occurred to me that "dlrs." might occur at the end of a sentence, in which case, it should _retain_ its period. What you could do is take "dlrs." to "donuts." with one search, then define a later search to take "donuts.." to "donuts~" (to preseve the end of sentence period), _then_ define a later search to take "donuts." to "donuts", then one _more_ to take "donuts~" to "donuts." Whew!
  13.  
  14. An even better reason to use later searches on earlier replaces it to concatenate to an exceptionally long replace string. Torquemada search and replace strings have an enormous maximum length (254 characters), but there is no limit beyond which someone will not have a pressing need to reach. So: you can search for a flag put in the line by a previous replace, and replace that flag with another long string.
  15.  
  16. But: be careful! The maximum length of a paragraph is 8,192 bytes (5 typed pages). If you do replaces that add substantially to the size of an already large paragraph, you will crash somewhat messily on a Type 28 error. In my life, I've seen _one_ 8K paragraph (in a book by Bucky Fuller), but you could _fail_ to see one if you: replace too hugely or replace too frequently (e.g., search for "e" and replace with some enormous string). So be careful. This really should never be a problem, but just in case: You've been warned!
  17.  
  18. This is the most Mac-like of the software I've written so far. The other stuff consists of a Unix-like core with a Mac-like skin wrapped around it. This is a Mac-like Apple with a few tiny seeds of Unix in its core. I squirm when I realize that I'm going to have to learn Pascal, but that's life in Mac-land...
  19.  
  20. Some ideas: I like to write CIS messages in Word, but I _hate_ stupidifying the quotes. So I've written a TQM Set that stupidifies the quotes for me (eventually I'll write a message formatter, but this does the trick for now). If you have a large batch of files that will all need the same searches done to them, you can open a representative file in your word processor and copy and paste the strings into the Pyre of Purification. If you Save the Set, you'll have it for the next time...
  21.  
  22. There is more and better to come with this. The next round, wherever it shows up, will include wild cards, better text editing power (everything that's happening now comes free from the Mac Toolbox), maybe five pages of strings, etc. On the point: users of big monitors may wonder why the Pyre of Purification is so scrunched: the reason is that I'm using every square inch of real estate available on a 9" screen...
  23.  
  24. This was fun. For a giggle, run the Torquemada Prefs shipped with this archive on a DTPforum message capture...
  25.  
  26. Very Best,
  27.  
  28. Greg Swann (70640,1574)
  29. 3/6/92
  30.  
  31.  
  32.  
  33. After the flames have died down...
  34.  
  35. Brad Walrod pointed out a problem with the way Torquemada was handling the clipboard. I fixed that, plus some other stuff. I used the software today to prep a file for XP8. Way awesome, if I do say so myself. I'm actually growing to like this pig, so I may do another upgrade within a week or two.
  36.  
  37. Changes in this version:
  38.  
  39. Clipboard fixed. Still no Select All, though. I'll be plugging that in when I go after exhaustive trapping of key events (not a trivial task).
  40.  
  41. I implemented a watch cursor to show that things are happening. This will be retrofitted to XP8 in due course.
  42.  
  43. There were certain unlikely conditions that could cause a crash. These have been fixed.
  44.  
  45. I'm packing in my Stupefaction TQM set. Reform will include a full Stupefcation filter (for moving Mac files to DOS machines), but this is enough for now (in conjunction with Word's Save Text with Line Breaks).
  46.  
  47. A certain fishlike something was added for fun. First person to see it wins (the prestige of having seen it first).
  48.  
  49. --GSS
  50. 3/9/92
  51.  
  52.  
  53.  
  54. I was working on a TQM set Wednesday and found myself saying "I need more strings..."
  55.  
  56. But that's not true. Twenty searches is a _lot_, more than I would ever want to do manually. I don't need _more_ strings, I need _better_ strings. And, of course, better strings are in my future, but not im my immediate future.
  57.  
  58. As an interim fix, I resolved to add a certain amount of wildcard search and replace. These wildcards work like Word's or Quark's, with two exceptions: (1) there are a lot more of them, and (2) they work in both the search and replace strings.
  59.  
  60. My feeling is that these wildcards will deal with maybe 90% of the occasions persons who are not Mike Arst might need regular expression parsing, so this is a good stop-gap solution. Without regular expressions, you can't build a bullet-proof acronym small-capsifier, but many other cool things can be done.
  61.  
  62. The widcards are these: ^0--^9 plus ^#, ^!, and ^^.
  63.  
  64. Last to first: ^^ is the caret character. Big lapse on my part, leaving that out. Evidently no one missed it (grin). That's the benefit of picking characters that almost never appear in text, a feature we could wish for in XPress Tags... ^^ is not really a wildcard, it's another alias, like ^t and ^p (which, BTW, are not case-sensitive (^p=^P)).
  65.  
  66. ^! denotes any ONE punctuation character in either low or high ASCII. If you have a genuine need to know what characters I'm regarding as punctuation, I'll email you the source (it's a real long list).
  67.  
  68. ^# denotes any ONE numerical character.
  69.  
  70. ^0, ^1, etc. through ^9 can denote any ONE character of any type, alphabetical, numerical, punctuation, or high-ASCII.
  71.  
  72. What does this mean? It means you can use ^0 through ^9 to do literal substitutions, and you can assure yourself of uniqueness with ^# and ^!. I didn't even say anything about uniqueness before, so presumably you can all take care of yourselves. Just to be safe: a search, and especially a wildcard search, can do big damage to your file if you're not careful. Better to do two searches with a lot of text than one with a little, if that little is ambiguous enough to toast text you _don't_ want to hit. In the same respect, the 'typed' wildcards (^# and ^!) will help you to make sure that you're hitting only the text you want to hit.
  73.  
  74. Here's how they work:
  75.  
  76. Walr^0^1        Walrus        would put Brad Walrod in the zoo; the found characters are being thrown away, so you could also say this as:
  77.  
  78. Walr^0^0        Walrus
  79.  
  80. Fair^0^1^2^3^4        Fore^0^3^1^2^4        would change Garry Fairbairn's last name to Forebrain. This is actually two examples: it shows how search wildcards can be redeployed in replace strings, and it demonstrates a search with potentially bad side-effects. Better is:
  81.  
  82. Fairb^1^2^3n        Foreb^3^1^2n        which does the same thing without totasting any other text. This also illustrates the variable-ness of the wildcards. You don't have to start with zero, you don't have to work in sequence, you don't have to do anything you don't want to do. You just have to remember that the variable character replaced will be the one found.
  83.  
  84. Cool: the wildness of the wildcards is local to a particular search. That means you don't have 12 wildcards, but, potentially, 240 (or more, if some are not used on the replace side). This works:
  85.  
  86. Pulver        Pulverize
  87. P^0^0^0^0^0ize        Posterize
  88. P^0^0^0^0^0ize        Pulver        if you have the need to play games with Bill's name without his knowing about it.
  89.  
  90. Likewise:
  91.  
  92. Gas^9ill        ^9ill
  93. kill        ^9ut the ^9omedy, if you ^9ould        since the variable text ^9 retains its definition until it is redefined.
  94.  
  95. One provisio: Torquemada is using the ASCII values from 20 to 31 for these wildcards. Mac files almost never use these values, but DOS files can, so Torquemada is insulating them at read time; if any are found in the source, they will be output in their XPress Tags equivalent form (e.g., ASCII 20 will be output as <\#20>). This probably will never happen (I chose the characters because their intended purpose is for communication and tape-drive control), but I didn't want to leave an untrapped wildcard-imposter hanging around in the stream.
  96.  
  97. And: alright already! With this version you can search for ^p^p (or ^p^p^p or ^p^p^p^p^p^p^p^p^p for all I care). You cannot search beyond the last ^p in a run of them, but you can grab all there are in a sequence and do as you will with them. Complain to the head office if you want, but I think this is my last word on the subject. To do the kind of search Brad wants to do (which is what convinced me to implement XP8's reader in TQM), do this:
  98.  
  99. ^p^p        ^p@Bradstyle:        'Bradstyle:' will actually be the last thing in one buffer, while the text in that style will be the first thing in the next buffer, but the net effect is the one he wants to achieve.
  100.  
  101. If you are reformatting a DOS-like file, you need to do:
  102.  
  103. ^p^p        EOP
  104. ^p         
  105. EOP        ^p        because the second line would eat a ^p left by the first. Note: LFs are thrown away at read time.
  106.  
  107. Incidentally, the speed hit is almost entirely due to the wildcards. The XP8 reading engine is not as fast as what I had before, but no more than 10% slower. Also: because I'm using the XP8 read engine, I'm able to trap for exceptionally long paragraphs; a paragraph much longer than 4K will be truncated at a space, the space will be rendered as <\#32>, and the reading will pick up again where it left off. No crash.
  108.  
  109. And that's that. Unless I screwed up, I won't be giving any more time to this for a while. Still to come are Select All, better text editing services, and full regular expressions parsing (these wildcards will be retained). In the interim, (possibly) a configurable sorting engine and (definitely) Reform.
  110.  
  111. Greg Swann
  112. 3/13/92
  113.  
  114. PS: This bad elf is coming to the point where it needs a manual... But... my wife and Bill Pulver would hate it anyway... (grin)
  115.  
  116. PPS: Evidently I'm exceptionally bad at spelling names! Some other errors were fixed in Torquemada Prefs...
  117.